<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">用户基础信息</h3>

    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="table-responsive">
            <table class="table table-striped">
                <p style="display: none;" id="author_uid" class="data-uid">{{$uid}}</p>
                @foreach($envs as $key => $env)
                    <tr>
                        <td width="120px">{{ $env['name'] }}</td>
                        @if($env['name'] == "用户头像")
                            <td><img src="{{ $env['value'] }}" height="70" width="70"></td>
                        @elseif($env['name'] == "用户信息二维码")
                            <td><img src="{{ $env['value'] }}" height="80" width="80"><div style="font-size: 10px; color: red">(使用App扫描二维码进入用户主页~~)</div></td>

                        @elseif($env['name'] == "徽章")
                            @if($env['value'])
                                <td><img src="{{ $env['value'] }}" height="70" width="70">
                                    @if($commonEmblems_num > 0)
                                        <p style="font-size: 16px"><a class="all_emblem" href="javascript::void(0)">({{$commonEmblems_num}})</a></p>
                                    @endif
                                </td>
                            @else
                                <td>{{ $env['value'] }}</td>
                            @endif
                        @elseif($env['name'] == "启动日")
                            <td>{{ $env['value'] }}<div style="font-size: 10px; color: red">(适用于2019-07-01后注册的用户)</div></td>
                        @elseif($env['name'] == '手机号')
                            @if($env['value'] != "未绑定")
                                <td><a class="btn btn-primary show-phone" href="javascript::void(0)">{{$env['value']}}</a><div style="font-size: 10px; color: red">禁止向他人泄漏用户信息<br>我们会记录每一次用户信息查询操作，请谨慎处理</div></td>
                            @else
                                <td>{{ $env['value'] }}</td>
                            @endif
                        @else
                            <td>{{ $env['value'] }}</td>
                        @endif
                    </tr>
                @endforeach
            </table>
        </div>
        <!-- /.table-responsive -->
    </div>
    <!-- /.box-body -->
</div>

<script type="text/javascript">
    $('.show-phone').on('click',function(){
        var tag = document.getElementById('author_uid')
        var uid = tag.innerText
        layer.open({
            type: 2,
            title: '用户明文手机号',
            maxmin: true,
            area: ['300px', '100px'],
            content:'/admin/user/ShowBindPhone/'+uid,
        });
    });

    $('.all_emblem').on('click',function(){
        var tag = document.getElementById('author_uid')
        var uid = tag.innerText
        layer.open({
            type: 2,
            title: '用户全部徽章',
            maxmin: true,
            area: ['800px', '600px'],
            content:'/admin/user/AllEmblem/'+uid,
        });
    });

</script>
